// 第一步引入模块
var mongodb = require('mongodb');
var MongoClient=mongodb.MongoClient;
var dbUrl="mongodb://localhost:27017";
var dbName="2112B"
function connectMogo(res,cb){
    MongoClient.connect(dbUrl,function(err,db){
        if(err){
            console.log('链接数据库失败');
        }else{
            console.log('链接数据库成功');
            var dbase=db.db(dbName);
            cd(dbase,db);
        }
    })
}